#pragma warning disable 0618
using System;
using System.Collections.Generic;
using Table.DataModel;
namespace Table.Dao
{
    public class TableSailorSkillReleaseDao:DaoBase<TableSailorSkillRelease>
    {
        public override string GetFileName()
        {
            return "TableSailorSkillRelease.csv";
        }
        public override void BuildIndex()
        {
            if (cacheList != null)
            {
                cachePrimaryInt = new Dictionary<int, TableSailorSkillRelease>(cacheList.Count);
            }
            base.BuildIndex();
        }
        public override void AddOneIndex(TableSailorSkillRelease model)
        {
            if (!cacheOneIndex.ContainsKey(model.SkillId.ToString()))
            {
                cacheOneIndex[model.SkillId.ToString()] = new List<TableSailorSkillRelease>();
            }
            cacheOneIndex[model.SkillId.ToString()].Add(model);
        }
        public override void AddPrimaryIndex(TableSailorSkillRelease model)
        {
            #if UNITY_EDITOR
            if(cachePrimaryInt.ContainsKey(model.ReleaseId)) UnityEngine.Debug.LogError("数据表id重复:TableSailorSkillRelease->id: " + model.ReleaseId);
            #endif
            cachePrimaryInt[model.ReleaseId] = model;
        }
        protected override TableSailorSkillRelease ParseRowData(string[] rowData)
        {
            TableSailorSkillRelease data = new TableSailorSkillRelease();
            if (!string.IsNullOrEmpty(rowData[0]))
            {
                data.ReleaseId = int.Parse(rowData[0]);
            }
            if (!string.IsNullOrEmpty(rowData[1]))
            {
                data.SkillId = int.Parse(rowData[1]);
            }
            if (!string.IsNullOrEmpty(rowData[2]))
            {
                data.ReleaseTime = double.Parse(rowData[2]);
            }
            if (!string.IsNullOrEmpty(rowData[3]))
            {
                data.IsEmptyRelease = int.Parse(rowData[3]);
            }
            if (!string.IsNullOrEmpty(rowData[4]))
            {
                data.IsBuffEffect = int.Parse(rowData[4]);
            }
            if (!string.IsNullOrEmpty(rowData[5]))
            {
                data.ReleaseEffectNum = int.Parse(rowData[5]);
            }
            if (!string.IsNullOrEmpty(rowData[6]))
            {
                data.ReleaseWeight = int.Parse(rowData[6]);
            }
            if (!string.IsNullOrEmpty(rowData[7]))
            {
                data.ReleaseSelectRule = int.Parse(rowData[7]);
            }
            if (!string.IsNullOrEmpty(rowData[8]))
            {
                data.HitAnims = ParseData(rowData[8]);
            }
            if (!string.IsNullOrEmpty(rowData[9]))
            {
                data.HitAnimNormalizeTime = double.Parse(rowData[9]);
            }
            if (!string.IsNullOrEmpty(rowData[10]))
            {
                data.HitAudio = ParseData(rowData[10]);
            }
            if (!string.IsNullOrEmpty(rowData[11]))
            {
                data.HitActorAudioType = int.Parse(rowData[11]);
            }
            if (!string.IsNullOrEmpty(rowData[12]))
            {
                data.HitParticles = ParseData<int>(rowData[12]);
            }
            if (!string.IsNullOrEmpty(rowData[13]))
            {
                data.HitParticleType = int.Parse(rowData[13]);
            }
            if (!string.IsNullOrEmpty(rowData[14]))
            {
                data.HitParticleBone = string.Intern(rowData[14]);
            }
            if (!string.IsNullOrEmpty(rowData[15]))
            {
                data.HitParticleOffset = string.Intern(rowData[15]);
            }
            if (!string.IsNullOrEmpty(rowData[16]))
            {
                data.HitMaterialTransData = string.Intern(rowData[16]);
            }
            if (!string.IsNullOrEmpty(rowData[17]))
            {
                data.HitMaterialTransDuration = double.Parse(rowData[17]);
            }
            if (!string.IsNullOrEmpty(rowData[18]))
            {
                data.DisplacementFactor = string.Intern(rowData[18]);
            }
            if (!string.IsNullOrEmpty(rowData[19]))
            {
                data.DisplacementLimit = double.Parse(rowData[19]);
            }
            if (!string.IsNullOrEmpty(rowData[20]))
            {
                data.ProjParticleId = int.Parse(rowData[20]);
            }
            if (!string.IsNullOrEmpty(rowData[21]))
            {
                data.ProjRadius = double.Parse(rowData[21]);
            }
            if (!string.IsNullOrEmpty(rowData[22]))
            {
                data.ProjInitOffset = string.Intern(rowData[22]);
            }
            if (!string.IsNullOrEmpty(rowData[23]))
            {
                data.ProjType = int.Parse(rowData[23]);
            }
            if (!string.IsNullOrEmpty(rowData[24]))
            {
                data.ProjFlyTrailType = int.Parse(rowData[24]);
            }
            if (!string.IsNullOrEmpty(rowData[25]))
            {
                data.ProjFlyTrail = string.Intern(rowData[25]);
            }
            if (!string.IsNullOrEmpty(rowData[26]))
            {
                data.ProjFlySpeed = double.Parse(rowData[26]);
            }
            if (!string.IsNullOrEmpty(rowData[27]))
            {
                data.ProjFlyDuration = double.Parse(rowData[27]);
            }
            if (!string.IsNullOrEmpty(rowData[28]))
            {
                data.ProjFlyLastTime = double.Parse(rowData[28]);
            }
            if (!string.IsNullOrEmpty(rowData[29]))
            {
                data.ProjTargetInfo = string.Intern(rowData[29]);
            }
            if (!string.IsNullOrEmpty(rowData[30]))
            {
                data.PosChangeSpeed = double.Parse(rowData[30]);
            }
            if (!string.IsNullOrEmpty(rowData[31]))
            {
                data.PosChangeColliderParticleId = int.Parse(rowData[31]);
            }
            if (!string.IsNullOrEmpty(rowData[32]))
            {
                data.ShakeType = int.Parse(rowData[32]);
            }
            if (!string.IsNullOrEmpty(rowData[33]))
            {
                data.DealDelay = string.Intern(rowData[33]);
            }
            return data;
        }
    }
}
